<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick="">点击</button>
</body>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script>
    var aa = new Array();
    var date1 = new Date();
    var time1=date1.getFullYear()+"-"+(date1.getMonth()+1)+"-"+date1.getDate();
    aa.push(time1)
    function fun_date(aa){
        var date1 = new Date();
        var time1=date1.getFullYear()+"-"+(date1.getMonth()+1)+"-"+date1.getDate();//time1表示当前时间
        var date2 = new Date(date1);
        date2.setDate(date1.getDate()+aa);
        var time2 = date2.getFullYear()+"-"+(date2.getMonth()+1)+"-"+date2.getDate();
        return time2;
    }
    for (var i=1;i<8;i++){
        aa.push(fun_date(i))
    }
    for (var i=0;i<aa.length;i++){
        alert(aa[i])
    }

</script>
</html>